<?php
    class Message_model extends CI_Model {

        function __construct()
        {
            parent::__construct();
        }

        //新增
        function message_save_add($data)
        {
            $this->db->insert('crazy_message', $data); 
        }

        function message_by_id_one($id)
        {
            return $this->db->from('crazy_message')->where('id',$id)->get()->row();
        }
        
        function get_message_del($id)
        {
            $this->db->where('id', $id);
            $this->db->delete('crazy_message'); 
        }
        
         function get_message_modify($id,$data)
        {
            $this->db->where('id', $id);
            $this->db->update('crazy_message', $data); 
        }

    }
?>